home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
dev
/
amos
/
ProcLib20.lha
/
Text
/
OPENFONT.Amos
/
OPENFONT.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1993-09-30
|
1KB
|
52 lines
Procedure OPENFONT[NAME$,SIZE,_REM]
ER=0
If Upper$(Right$(NAME$,5))<>'.FONT' : NAME$=NAME$+'.font' : End If
NAME$=NAME$+Chr$(0)
Dreg(0)=8 : Dreg(1)=0 : S=Execall(-198)
If S=0 : ER=24 : End If
Loke S,Varptr(NAME$)
Doke S+4,SIZE
Doke S+6,0
Areg(0)=S
FONT=Gfxcall(-72)
If FONT=0
Dreg(0)=10 : Dreg(1)=0 : T=Execall(-198)
If T=0
ER=24
Else
A$='diskfont.library'+Chr$(0) : Areg(1)=Varptr(A$) : Dreg(0)=0
DISKFONT_LIB=Execall(-552)
If DISKFONT_LIB=0
ER=81
Else
Doke T,$4DF9
Loke T+2,DISKFONT_LIB
Loke T+6,$4EEEFFE2
Areg(0)=S : Areg(1)=S
Call T
FONT=Dreg(0)
If FONT=0 : ER=44 : End If
End If
End If
End If
If DISKFONT_LIB : Areg(1)=DISKFONT_LIB : X=Execall(-414) : End If
If T : Areg(1)=T : Dreg(0)=10 : X=Execall(-210) : End If
If S : Areg(1)=S : Dreg(0)=8 : X=Execall(-210) : End If
If ER : Error ER : End If
If _REM
Areg(1)=FONT : X=Gfxcall(-78) : Areg(1)=FONT : X=Gfxcall(-78)
Else
Get Rom Fonts
FONT=0
N$=Upper$(Left$(NAME$,Len(NAME$)-6))
Repeat
Inc FONT
A$=Upper$(Font$(FONT))
A$=Left$(A$,Instr(A$,'.FONT')-1)
A=Val(Mid$(Font$(FONT),31,5))
Until(A$=N$ and A=SIZE) or(A$='')
If A$=''
Error 44
End If
End If
End Proc[FONT]